import request from '@/utils/request'
import { encryptionData } from '@/utils/com'
import Qs from 'qs'

/* 获取开户信息 */
export function getWalletStatus(data) {
  return request({
    url: '/jcdGys/wallet/myWallet',
    method: 'get',
    headers: encryptionData(data, '/wallet/myWallet'),
    params: data
  })
}

/* 获取开户信息-总后台 */
export function getAdminWalletList(data) {
  return request({
    url: '/jcdPayment/account/getManageAcct',
    method: 'get',
    headers: encryptionData(data, '/account/getManageAcct'),
    params: data
  })
}

/* 获取我的钱包-列表信息 */
export function getWalletList(data) {
  return request({
    url: '/jcdOrder/paymentOrder/page',
    method: 'get',
    headers: encryptionData(data, '/paymentOrder/page'),
    params: data
  })
}

/* 完善资料 */
export function updateComUser(data) {
  return request({
    // url: '/jcdGys/wallet/updateComUser',
    url: '/jcdPayment/account/comUserUpdate',
    method: 'post',
    // headers: encryptionData(data, '/wallet/updateComUser'),
    headers: encryptionData(data, '/account/comUserUpdate'),
    data: Qs.stringify(data)
  })
}
/* 提现 */
export function withdrawMoney(data) {
  return request({
    url: '/jcdGys/wallet/withdrawApp',
    method: 'post',
    headers: encryptionData(data, '/wallet/withdrawApp'),
    data: Qs.stringify(data)
  })
}

/* 我要开户-1-开户信息- 企业卡户提交  */
export function addAccont(data) {
  return request({
    url: '/jcdGys/wallet/openCompanyAcct',
    method: 'post',
    headers: encryptionData(data, '/wallet/openCompanyAcct'),
    data: Qs.stringify(data)
  })
}

/* 我要开户-1-开户信息- 个人开户提交  */
export function addPerAccont(data) {
  return request({
    url: '/jcdGys/wallet/openPersonAcct',
    method: 'post',
    headers: encryptionData(data, '/wallet/openPersonAcct'),
    data: Qs.stringify(data)
  })
}

/* 我要开户-2-绑卡-提交  */
export function bindCard(data) {
  return request({
    url: '/jcdGys/wallet/bindSettleAcct',
    method: 'post',
    headers: encryptionData(data, '/wallet/bindSettleAcct'),
    data: Qs.stringify(data)
  })
}

/* 我要开户-3-打款验证-提交  */
export function amountCheck(data) {
  return request({
    url: '/jcdGys/wallet/amountCheck',
    method: 'post',
    headers: encryptionData(data, '/wallet/amountCheck'),
    data: Qs.stringify(data)
  })
}
